#ifndef _best_core_timer_h_
#define _best_core_timer_h_

#include "pub.h"

#ifdef __cplusplus
extern "C" {
#endif

#define CORE_SPEC_MAX_TIMER_SIZE 10

typedef enum {
    E_CORE_TIMER_LOOP,
    E_CORE_TIMER_INVALID,
} CORE_TIMER_TYPE;

typedef enum {
    E_CORE_TIMER_MODULE_LISTEN,
    E_CORE_TIMER_MODULE_INVALID = CORE_SPEC_MAX_TIMER_SIZE,
} CORE_TIMER_MODULE_TYPE;

typedef BEST_UINT32 (*CORE_TimerCallbackFunc)(BEST_VOID *para1,
                                              BEST_VOID *para2,
                                              BEST_VOID *para3,
                                              BEST_VOID *para4);

BEST_STATUS CORE_TimerStart(CORE_TIMER_MODULE_TYPE eModuleType,
                            BEST_UINT32 delay, CORE_TIMER_TYPE eTimerType,
                            CORE_TimerCallbackFunc fn, BEST_VOID *para1,
                            BEST_VOID *para2, BEST_VOID *para3,
                            BEST_VOID *para4);

BEST_STATUS CORE_TimerStop(CORE_TIMER_MODULE_TYPE eModuleType);

BEST_STATUS CORE_TimerInit();
#ifdef __cplusplus
}
#endif
#endif
